package br.fatec.ads.decorator;

import org.displaytag.decorator.TableDecorator;

import br.fatec.ads.model.RedeSocial;

public class RedeSocialDecorator extends TableDecorator {
	public String getAtivoDescricao(){
		RedeSocial redeSocial = (RedeSocial) getCurrentRowObject();
		
		return redeSocial.getAtivo().equals("S") ? "Ativo" : "Inativo";
	}
	
	public String getLinkRedeSocialExcluir(){
		RedeSocial redeSocial = (RedeSocial) getCurrentRowObject();
		
		String link = "<img src=\"img/grid_excluir.jpg\" " +
				"onclick=\"window.location='RedeSocialExcluir?idRedeSocialExcluir=" + redeSocial.getIdRedeSocial() + "'\" " +
						"style=\"cursor: pointer;\">";
		return link;
	}
}